﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using Common.Framework.GlobalEntities;

namespace Common.Framework.Cache
{
    abstract public class CacheManager  
    {
        private Dictionary<string, object> m_CacheRepository = new Dictionary<string, object>();
               
        public void AddCategory<T>(string key) where T: class ,new()
        {
            m_CacheRepository.Add(key, new  T());
        }

        public void RemoveCategory(string key)
        {
            m_CacheRepository.Remove(key);
        }

        public T GetCategory<T>(string key) where T : class
        {
            return m_CacheRepository[key] as T  ;
        }
    
    }
}
